<template>
    <view>
        <view id="pic-box" class="pic-box" :style="'background: url(' + (list.bg ? list.bg : '/wxz_wzbagent/resource/images/qrbg.jpg') + ') no-repeat;'">
            <view class="opacity">
                <view class="user-img">
                    <image :src="user.pic" mode="scaleToFill"></image>
                </view>
                <p class="user-name">{{ user.name }}</p>
                <p class="room-title">{{ list['desc1'] }}</p>

                <p class="room-title" style="color: #aaaaaa; margin-top: 10px">{{ list['desc2'] }}</p>
                <image class="qr" src="" style="width: 220px; height: 220px"></image>
                <p class="user-find">{{ list['desc3'] }}</p>
                <p class="start-time">{{ list['desc4'] }}</p>
                <p class="add-qr">长按二维码，即可参加</p>
            </view>
        </view>
        <image src="" id="myimg"></image>
    </view>
</template>

<script>
var app = getApp();
export default {
    data() {
        return {
            xuan_id: '',
            uniacid: '',
            rid: '',
            live_id: '',
            vote_index: '',

            user: {
                pic: '',
                name: ''
            },

            list: {
                bg: false
            }
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
		console.log(333333333333)
        var that = this;
        that.setData({
            xuan_id: options.xuan_id,
            uniacid: options.uniacid,
            rid: options.rid,
            live_id: options.live_id,
            vote_index: options.index
        });
        app.globalData.util.request({
            url: 'lives_new&r=personal',
            data: {
                xuan_id: that.xuan_id,
                uniacid: that.uniacid,
                rid: that.rid,
                live_id: that.live_id,
                vote_index: that.index
            },
            cachetime: '0',
            showLoading: 0,
            success: function (t) {
                that.setData({
                    user: t.data.data.user,
                    list: t.data.data.list
                });
            }
        });
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {}
};
</script>
<style>
@import './vote_share.css';
</style>
